package com.huike.mapper;

import com.huike.pojo.Register;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface RegisterMapper {
    List<Register> findAll();

    List<Register> PaginationSearch(@Param("id") Integer id,
                                    @Param("registerName") String registerName,
                                    @Param("deptName") String deptName,
                                    @Param("star") String star,
                                    @Param("end") String end);

    Register findById(Integer id);

    void update(@Param("id") Integer id,
                @Param("registerName") String registerName,
                @Param("idNumber") String idNumber,
                @Param("medicalNumber") String medicalNumber,
                @Param("phone") String phone,
                @Param("selfPrice") Integer selfPrice,
                @Param("sex") Integer sex,
                @Param("age") Integer age,
                @Param("lookDoctor") Integer lookDoctor,
                @Param("department") Integer department,
                @Param("doctorId") Integer doctorId,
                @Param("note") String note);

    List<Register> PaginationSearchForISC(@Param("id")Integer id,@Param("registerName") String registerName);

    void updateForAdd(@Param("id") Integer id,
                      @Param("registerName") String registerName,
                      @Param("idNumber") String idNumber,
                      @Param("medicalNumber") String medicalNumber,
                      @Param("phone") String phone,
                      @Param("selfPrice") Integer selfPrice,
                      @Param("sex") Integer sex,
                      @Param("age") Integer age,
                      @Param("lookDoctor") Integer lookDoctor,
                      @Param("doctorId") Integer doctorId,
                      @Param("note") String note);

    void updateStatus(Integer id);

    Integer addRegister(Register register);

    List<Register> getRegisters(@Param("id") Integer id,
                                @Param("registerName") String registerName,
                                @Param("deptName") String deptName,
                                @Param("star") String star,
                                @Param("end") String end);

    Integer rUpdateStatus(@Param("id")Integer id,@Param("status")Integer status);

    Integer updateRegister(Register register);

    List<Register> getAllRegister();

}
